<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');?>
<div class="pad_10">
<form name="searchform" action="" method="get" >
<input type="hidden" value="epaper" name="m">
<input type="hidden" value="weixin_member" name="c">
<input type="hidden" value="list" name="a">
<input type="hidden" value="1064" name="menuid">
<table width="100%" cellspacing="0" class="search-form">
    <tbody>
		<tr>
		<td>
		<div class="explain-col">
			编辑：
			<select name="is_admin">
				<option></option>
				<option <?php echo isset($_GET['is_admin'])&&$_GET['is_admin']=='是'?"selected":""?> value="是">是</option>
				<option <?php echo isset($_GET['is_admin'])&&$_GET['is_admin']=='否'?"selected":""?> value="否">否</option>
			</select>
			昵称：
			<input name="name" type="input" value="<?php if(isset($_GET['name'])) {echo $_GET['name'];}?>" class="input-text" />
			<input type="submit" name="search" class="button" value="<?php echo L('search')?>" />
		</div>
		</td>
		</tr>
    </tbody>
</table>
</form>

<form name="myform" action="" method="post">

<div class="table-list">
    <table width="100%" cellspacing="0" >
        <thead>
	<tr>
	<th width="10%">ID</td>
	<th width="10%">昵称</th>
	<th width="20%">openid</th>
	<th width="20%">上次登陆ip</th>
	<th width="20%">上次登陆时间</th>
	<th width="10%">编辑</th>
	<th width="10%">编辑设定</th>
	</tr>
        </thead>
    <tbody>
    

<?php
foreach($datas as $r) {
?>
<tr>
<td align="center"><?php echo $r['id']?></td>
<td align="center"><?php echo $r['name']?></td>
<td align="center"><?php echo $r['openid']?></td>
<td align="center"><?php echo $r['last_ip']?></td>
<td align="center"><?php echo $r['last_login_time']?></td>
<td align="center"><?php echo $r['is_admin']=='是'?'是':'';?></td>
<td align="center">
	<?php if($r['is_admin']=='是'){?>
		<a href="?m=epaper&c=weixin_member&a=set_admin&is_admin=否&id=<?php echo $r['id']?>">
		取消</a>
	<?php }else{?>
		<a href="?m=epaper&c=weixin_member&a=set_admin&is_admin=是&id=<?php echo $r['id']?>">
		设定</a>
	<?php }?>
</td>
</tr>
<?php } ?>
	</tbody>
    </table>

	<div id="pages"><?php echo $pages;?></div>
</div>

</form>
</div>
</body>
</html>
